package other;

public class Time {

	private static short YY = 0;
	private static byte MM = 0;
	private static byte DD = 0;
	
	private static byte hh = 0;
	private static byte mm = 0;
	private static byte ss = 0;
	
	private static short ms = 0;
	
	public static void tick(int ticks){
		for(int i = 0; i<ticks; i++){
			tick();
		}
	}
	
	public static void tick(){
		ms++;
		if(ms > 1000){
			ms = 0;
			ss++;
		}
		if(ss > 60){
			ss = 0;
			mm++;
		}
		if(mm > 60){
			mm = 0;
			hh++;
		}
		if(hh > 24){
			hh = 0;
			DD++;
		}
		if(DD > 30){
			DD = 0;
			MM++;
		}
		if(MM > 12){
			MM = 0;
			YY++;
		}		
	}
	
	public static String getTime(){
		return getYY()+":"+getMM()+":"+getDD()+" - "+getHh()+":"+getMm()+":"+getSs()+"::"+getMs();
	}

	public static short getYY() {
		return YY;
	}

	public static void setYY(short yY) {
		YY = yY;
	}

	public static byte getMM() {
		return MM;
	}

	public static void setMM(byte mM) {
		MM = mM;
	}

	public static byte getDD() {
		return DD;
	}

	public static void setDD(byte dD) {
		DD = dD;
	}

	public static byte getHh() {
		return hh;
	}

	public static void setHh(byte hh) {
		Time.hh = hh;
	}

	public static byte getMm() {
		return mm;
	}

	public static void setMm(byte mm) {
		Time.mm = mm;
	}

	public static byte getSs() {
		return ss;
	}

	public static void setSs(byte ss) {
		Time.ss = ss;
	}

	public static short getMs() {
		return ms;
	}

	public static void setMs(short ms) {
		Time.ms = ms;
	}

}
